package com.modernyuanshiren;

import java.util.List;

public interface IAction<T extends IStatus<T, U>, U extends ISingleAction<T, U>> {
	default String getName() {
		return getAction().getName();
	};

	List<IElement> getElements();

	U getAction();

	public T apply(T origin);

	default boolean notNecessary(IAction<T, U> preAction) {
		return getAction().notNecessary(preAction.getAction())
				&& getElements().equals(preAction.getElements());
	};

}
